#include<iostream>
#include<sys/types.h>
#include<unistd.h>
#include<signal.h>
#include<stdlib.h>
using std::cout;
using std::endl;
int cnt=1;
void handler(int sigNum)
{
    cout<<"I am process,my pid:: "<<getpid()<<"The signal::"<<sigNum<<"Time::"<<cnt<<endl;
    cnt++;
}
int main()
{
    signal(2,handler);
    signal(6,handler);
    sleep(1);
    while(1)
    {
        raise(2);
        sleep(1);
        if(cnt>4)
        {
            abort();
        }
    }
    return 0;
}
